package com.czwj.action;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.czwj.entities.Permission;
import com.czwj.entities.DataGridData;
import com.czwj.entities.OperateResult;
import com.czwj.entities.PageBean;
import com.czwj.entities.Role;
import com.czwj.entities.UserInfo;
import com.czwj.service.PermissionService;
import com.czwj.service.RoleService;
import com.czwj.service.SummaryUserService;
import com.czwj.service.UserInfoService;
import com.czwj.util.TextUtil;

@Controller
public class RoleAction{
	@Resource
	RoleService roleService;
	
	@RequestMapping(value = "/roles",method = RequestMethod.POST)
	@ResponseBody
	public List<Role> getAllRoles(HttpServletRequest request,HttpServletResponse response){
		response.setCharacterEncoding("UTF-8");
		List<Role> list = roleService.getAll();
		return list;
	}
	
	
}
